package org.smartercontext.contextmger.communication;

public class Communication_ImplProxy implements org.smartercontext.contextmger.communication.Communication_Impl {
  private String _endpoint = null;
  private org.smartercontext.contextmger.communication.Communication_Impl communication_Impl = null;
  
  public Communication_ImplProxy() {
    _initCommunication_ImplProxy();
  }
  
  public Communication_ImplProxy(String endpoint) {
    _endpoint = endpoint;
    _initCommunication_ImplProxy();
  }
  
  private void _initCommunication_ImplProxy() {
    try {
      communication_Impl = (new org.smartercontext.contextmger.communication.Communication_ImplServiceLocator()).getCommunication_Impl();
      if (communication_Impl != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)communication_Impl)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)communication_Impl)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (communication_Impl != null)
      ((javax.xml.rpc.Stub)communication_Impl)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public org.smartercontext.contextmger.communication.Communication_Impl getCommunication_Impl() {
    if (communication_Impl == null)
      _initCommunication_ImplProxy();
    return communication_Impl;
  }
  
  public boolean login(java.lang.String loginT, java.lang.String format) throws java.rmi.RemoteException{
    if (communication_Impl == null)
      _initCommunication_ImplProxy();
    return communication_Impl.login(loginT, format);
  }
  
  public void receiveCurrentLocation(java.lang.String location, java.lang.String format) throws java.rmi.RemoteException{
    if (communication_Impl == null)
      _initCommunication_ImplProxy();
    communication_Impl.receiveCurrentLocation(location, format);
  }
  
  public void receiveBuyerPreferences(java.lang.String preferences, java.lang.String format) throws java.rmi.RemoteException{
    if (communication_Impl == null)
      _initCommunication_ImplProxy();
    communication_Impl.receiveBuyerPreferences(preferences, format);
  }
  
  public java.lang.String provideContext(java.lang.String username, java.lang.String typeInf, java.lang.String format) throws java.rmi.RemoteException{
    if (communication_Impl == null)
      _initCommunication_ImplProxy();
    return communication_Impl.provideContext(username, typeInf, format);
  }
  
  
}